<!--
  @author wangjie
  @since 2020-03-25
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>

<body>
<div class="layui-fluid">
    <div class="layui-card">
        <form method="POST" class="layui-form" id="zmn-form" action="/push/noticeApp/stdlibPage.action">
            <div class="zmn-form-item">
                <!--默认情况下标签item-inline占据1列-->
                <div class="layui-form-item">
                    <label class="layui-form-label">ID/标题：</label>
                    <div class="layui-input-block">
                        <div class="layui-col-xs3">
                            <input type="text" name="titleOrId" id="titleOrId" lay-filter="titleOrId"
                                   th:value="${vo.titleOrId}"
                                   autocomplete="off"
                                   class="layui-input">
                        </div>
                        <div class="layui-col-xs3" style="margin-left: 5px">
                            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="zmn-form-submit"><i
                                    class="layui-icon">&#xe615;</i>
                            </button>
                            <button type="button" lay-filter="newStdlib" id="newStdlib"
                                    th:lay-href="|/standard/record/detail.action|"
                                    class="layui-btn layui-btn-sm layui-btn-primary">新增标准
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </form>
        <div class="layui-card-body">
            <table class="layui-hide" id="zmn-table" lay-filter="zmn-table">
                <thead>
                <tr>
                    <th lay-data="{type:'radio', width:50, unresize:true, align:'center'}"></th>
                    <th lay-data="{field:'standardId',  unresize:false, align:'center'}">ID</th>
                    <th lay-data="{field:'title',  unresize:false, align:'center'}">标题</th>
                    <th lay-data="{field:'version',  unresize:false, align:'center'}">版本号</th>
                    <th lay-data="{field:'category',  unresize:false, align:'center'}">类别</th>
                    <th lay-data="{field:'createTime',  unresize:false, align:'center'}">创建时间</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="item:${items}">
                    <td></td>
                    <td th:text="${item.standardId}"></td>
                    <td th:text="${item.title}"></td>
                    <td th:text="${item.version}"></td>
                    <td th:text="${T(com.zmn.plat.common.dictionary.StandardCategoryEnum).of(item.category).name}"></td>
                    <td th:text="${(item.createTime==null?'':#dates.format(item.createTime, 'yyyy-MM-dd HH:mm:ss'))}"></td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
</body>
</html>

<script type="text/html" id="zmn-table-tool">
    <div class="layui-btn-container">
        <div class="layui-btn-group">
            <button class="layui-btn layui-btn-sm" lay-event="choose">确认选择</button>
        </div>
    </div>
</script>

<!--主js代码置于html外-->
<script type="text/javascript" th:inline="javascript">

    let json = {
        totalCount: [[${vo.totalCount}]],
        pageSize: [[${vo.pageSize}]],
        pageIndex: [[${vo.pageIndex}]]
    };
    layui.config({
        base: "/static/lay/",
        version: 20200321120021
    }).extend({
        index: "lib/index",
        push_notice_stdlib: "push/notice/zmn.push.notice.stdlib",
    }).use(['index', 'push_notice_stdlib']);
</script>
